//
//  LinkInfo.h
//  RoutingEvaluator
//
//  Created by Christopher Kemsley on 4/12/12.
//  Copyright (c) 2012 iAppolopolis. All rights reserved.
//

#include <vector>
#import "Types.hpp"
#import "NodeInfo.hpp"
#import "CostAlgorithm.hpp"

NamespaceBegin



class	LinkInfoSet ;





class	LinkInfo : public Object
{
public:
	
	static LinkInfo*	createLinkInfo	( CostAlgorithm const & algorithm , NodeInfo * node1 , NodeInfo * node2 ) ;
	
	
	NodeInfo* const			endpoint1 ;
	NodeInfo* const			endpoint2 ;
	CostAlgorithm const&	algorithm ;
	
	Float64					distance () ;
	Float64					cost () ;
	
private:
	friend class LinkInfoSet ;
	LinkInfo	( CostAlgorithm const & algorithm , NodeInfo * node1 , NodeInfo * node2 ) ;
} ;



class	LinkInfoSet : public Object
{
public:
	static LinkInfoSet*		createSetWithNodes	( CostAlgorithm const & algorithm , NodeInfoSet * set ) ;
	
	
	std::vector<LinkInfo*> const&	links () ;
	
private:
	std::vector<LinkInfo*>	mCosts ;
	
	LinkInfoSet ( std::vector<LinkInfo*> const & inCosts ) ;
} ;



NamespaceEnd
